﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace YiDingCanWp7
{
    public class SearchSettings
    {
        public Setting<int> Distance = new Setting<int>("ditance", 500); 
        public bool BoolDistance500 {
            get {
                return Distance.Value==500;
            }
            set {
                if (value==true)
                {

                    Distance.Value = 500;
                }
            }
        }
        public bool BoolDistance1000
        {
            get
            {
                return Distance.Value==1000;;
            }
            set
            {
                if(value==true)
                Distance.Value = 1000;

            }
        }
        public bool BoolDistance2000
        {
            get
            {
                return Distance.Value==2000;
            }
            set
            {
                if(value==true)
                Distance.Value = 2000;
            }
        }
        public bool BoolDistance5000
        {
            get
            {

                return Distance.Value==5000;
            }
            set
            {
                if (value==true)
                {
                    Distance.Value = 5000;
                }
            }
        }
        public bool BoolDistance10000
        {
            get
            {
                return Distance.Value==10000;
            }
            set
            {
                if(value==true)
                Distance.Value = 10000;
            }
        } 
        public bool BoolDistance20000
        {
            get
            {
                return Distance.Value==20000;
            }
            set
            {
                if(value==true)
                Distance.Value = 20000;
            }
        }
        private Setting<bool> boolDinner = new Setting<bool>("boolDinner", true);
        public bool BoolDinner
        {
            get
            {
                return boolDinner.Value;
            }
            set
            {
                boolDinner.Value = value;
            }
        }
        private Setting<bool> boolSuperMarket = new Setting<bool>("boolSuperMarket", false);
        public bool BoolSuperMarket
        {
            get
            {
                return boolSuperMarket.Value;
            }
            set
            {
                boolSuperMarket.Value = value;
            }
        }
        private Setting<bool> boolDrug = new Setting<bool>("boolDrug", false);
        public bool BoolDrug
        {
            get
            {
                return boolDrug.Value;
            }
            set
            {
                boolDrug.Value = value;
            }
        }
        private Setting<bool> boolFlower = new Setting<bool>("boolFlower", false);
        public bool BoolFlower
        {
            get
            {
                return boolFlower.Value;
            }
            set
            {
                boolFlower.Value = value;
            }
        }

        private Setting<string> keyWord = new Setting<string>("keyword", string.Empty);
        public string KeyWord
        {
            get { return keyWord.Value; }
            set { keyWord.Value = value; }
        }

    }
}
